home *** CD-ROM | disk | FTP | other *** search
- Indirect:Start
- New (Foo,Fee)
- Foo = 7
- Fee = 7
- Win:Add("Indirection Example",0,0,15,50,Here)
- Str:PutLine('This test program shows the result of method that')
- Str:PutLIne('uses an "Indirect" parameter to change the value ')
- Str:PutLIne('of a variable in the calling method. In this ')
- Str:PutLIne('example, Foo is indirect, Fee is normal. ')
- Str:PutLIne('Although the subroutine changes the value of both')
- Str:PutLIne('variables, when you return from the subroutine, ')
- Str:PutLIne('only Foo has been changed, because the called ')
- Str:PutLIne('method specified Foo as an indirect value.' )
- Str:PutLIne()
- Str:PutLine(" At start Foo is {Foo}, Fee is {Fee}")
- Str:PutLine()
- Indirect:Increment(Foo, Fee, 8, 8)
- Str:PutLine(" At end Foo is now {Foo}, Fee is {Fee}")
- Win:Pause
- Return
-
- Indirect:Increment(*Foo,Fee)
- ++Foo
- ++Fee
- Str:PutLine(" In Increment method Foo is now {Foo}, Fee is {Fee}")
- Str:PutLine()
- Return (Ok)
-
-